home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / x / volume9 / xtiff / patch4 next >
Encoding:
Internet Message Format  |  1990-10-09  |  5.1 KB

  1. Path: uunet!jarthur!usc!apple!netcom!amdcad!sun!decwrl.dec.com
  2. From: dbs@decwrl.dec.com (dan sears)
  3. Newsgroups: comp.sources.x
  4. Subject: v09i067: xtiff, Patch4, Part01/01
  5. Message-ID: <143447@sun.Eng.Sun.COM>
  6. Date: 7 Oct 90 18:04:39 GMT
  7. References: <csx-09i067:xtiff@uunet.UU.NET>
  8. Sender: news@sun.Eng.Sun.COM
  9. Lines: 134
  10. Approved: argv@sun.com
  11.  
  12. Submitted-by: dbs@decwrl.dec.com (dan sears)
  13. Posting-number: Volume 9, Issue 67
  14. Archive-name: xtiff/patch4
  15. Patch-To: xtiff: Volume 7, Issue 36 (5/12/90)
  16. Patch-To: xtiff: Volume 7, Issue 54 (5/17/90: patch1)
  17. Patch-To: xtiff: Volume 7, Issue 80 (5/31/90: patch2)
  18. Patch-To: xtiff: Volume 7, Issue 100 (6/18/90: patch3)
  19.  
  20. This patch file fixes a colormap bug in xtiff
  21. when the user specifies the -nopixmap option
  22. when displaying a bitmap.
  23.  
  24. --Dan
  25.  
  26. diff -r -c rev3/Imakefile rev4/Imakefile
  27. *** rev3/Imakefile    Mon Jun 18 11:01:18 1990
  28. --- rev4/Imakefile    Tue Oct  2 16:00:59 1990
  29. ***************
  30. *** 7,14 ****
  31.   #           -DDESTDIR=/dc0/X11/R4/mit
  32.   #
  33.           PROGRAMS = xtiff
  34. !  LOCAL_LIBRARIES = ../2.2/libtiff/libtiff.a-mips -lX11 -lm
  35. !   EXTRA_INCLUDES = -I../libtiff/libtiff
  36.               SRCS = xtiff.c
  37.               OBJS = xtiff.o
  38.        CDEBUGFLAGS = -g
  39. --- 7,14 ----
  40.   #           -DDESTDIR=/dc0/X11/R4/mit
  41.   #
  42.           PROGRAMS = xtiff
  43. !  LOCAL_LIBRARIES = ../2.2/libtiff/libtiff.a -lX11 -lm
  44. !   EXTRA_INCLUDES = -I../2.2/libtiff
  45.               SRCS = xtiff.c
  46.               OBJS = xtiff.o
  47.        CDEBUGFLAGS = -g
  48. diff -r -c rev3/patchlevel.h rev4/patchlevel.h
  49. *** rev3/patchlevel.h    Mon Jun 18 11:01:30 1990
  50. --- rev4/patchlevel.h    Tue Oct  2 16:00:59 1990
  51. ***************
  52. *** 1 ****
  53. ! #define PATCHLEVEL 3
  54. --- 1 ----
  55. ! #define PATCHLEVEL 4
  56. diff -r -c rev3/xtiff.c rev4/xtiff.c
  57. *** rev3/xtiff.c    Mon Jun 18 11:19:11 1990
  58. --- rev4/xtiff.c    Tue Oct  2 16:00:59 1990
  59. ***************
  60. *** 4,17 ****
  61.    * Dan Sears
  62.    * Chris Sears
  63.    *
  64. !  * Revsion 1.3  90/06/18
  65.    *      Fixed a bug in handling different color masks and byte orders
  66.    *          for DirectColor visuals.
  67. !  * Revsion 1.2  90/05/29
  68.    *      Fixed a bug with MINISWHITE images.
  69. !  * Revsion 1.1  90/05/16
  70.    *      Fixed a few minor bugs.
  71. !  * Revsion 1.0  90/05/07
  72.    *      Initial release.
  73.    *
  74.    * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
  75. --- 4,19 ----
  76.    * Dan Sears
  77.    * Chris Sears
  78.    *
  79. !  * Revision 1.4  90/09/27
  80. !  *      Fixed a bug with colormapping nopixmapped and pixmapped bitmaps.
  81. !  * Revision 1.3  90/06/18
  82.    *      Fixed a bug in handling different color masks and byte orders
  83.    *          for DirectColor visuals.
  84. !  * Revision 1.2  90/05/29
  85.    *      Fixed a bug with MINISWHITE images.
  86. !  * Revision 1.1  90/05/16
  87.    *      Fixed a few minor bugs.
  88. !  * Revision 1.0  90/05/07
  89.    *      Initial release.
  90.    *
  91.    * Copyright 1990 by Digital Equipment Corporation, Maynard, Massachusetts.
  92. ***************
  93. *** 491,497 ****
  94.   
  95.       xGcValues.function = GXcopy;
  96.       xGcValues.plane_mask = AllPlanes;
  97. !     if (tfPhotometricInterpretation == PHOTOMETRIC_MINISWHITE) {
  98.           xGcValues.foreground = XWhitePixel(xDisplay, xScreen);
  99.           xGcValues.background = XBlackPixel(xDisplay, xScreen);
  100.       } else {
  101. --- 493,499 ----
  102.   
  103.       xGcValues.function = GXcopy;
  104.       xGcValues.plane_mask = AllPlanes;
  105. !     if (tfPhotometricInterpretation == PHOTOMETRIC_MINISBLACK) {
  106.           xGcValues.foreground = XWhitePixel(xDisplay, xScreen);
  107.           xGcValues.background = XBlackPixel(xDisplay, xScreen);
  108.       } else {
  109. ***************
  110. *** 706,713 ****
  111.            * of depth one might not be supported."  Therefore we create a pixmap
  112.            * of depth one and use XCopyPlane().  This is idiomatic.
  113.            */
  114. !         if (xImageDepth == 1) {
  115. !             xBitmapGc = XCreateGC(xDisplay, xImagePixmap, 0, &xGcValues);
  116.               XPutImage(xDisplay, xImagePixmap, xBitmapGc, xImage,
  117.                   0, 0, 0, 0, xImage->width, xImage->height);
  118.           } else
  119. --- 708,718 ----
  120.            * of depth one might not be supported."  Therefore we create a pixmap
  121.            * of depth one and use XCopyPlane().  This is idiomatic.
  122.            */
  123. !         if (xImageDepth == 1) {         /* just pass the bits through */
  124. !             xGcValues.foreground = 1;   /* foreground describes set bits */
  125. !             xGcValues.background = 0;   /* background describes clear bits */
  126. !             xBitmapGc = XCreateGC(xDisplay, xImagePixmap,
  127. !                 GCForeground | GCBackground, &xGcValues);
  128.               XPutImage(xDisplay, xImagePixmap, xBitmapGc, xImage,
  129.                   0, 0, 0, 0, xImage->width, xImage->height);
  130.           } else
  131. diff -r -c /dev/null rev4/README
  132. *** /dev/null
  133. --- rev4/README    Tue Oct  2 16:11:00 1990
  134. ***************
  135. *** 0 ****
  136. --- 1,4 ----
  137. xtiff is a tool for viewing a TIFF file in an X window.  It was written to
  138. handle as many different kinds of TIFF files as possible while remaining
  139. simple, portable and efficient.  xtiff requires Sam Leffler's libtiff package
  140. which can be found on ucbvax.berkeley.edu.
  141.  
  142. dan
  143. ----------------------------------------------------
  144. O'Reilly && Associates   argv@sun.com / argv@ora.com
  145. Opinions expressed reflect those of the author only.
  146.